 <template>
  <div>
    <button ref="tar" @click="testclick">
      {{ msg }}
    </button>
  </div>
</template>
 <script>
export default {
  data() {
    return {
      msg: "初始值",
    };
  },
  methods: {
    testclick() {
      this.msg = "改变了的值";
      this.$nextTick(() => {
        console.log(this.$refs.tar.innerText);
      });
    },
  },
  computed: {},
  mounted(){
  var arrnew=[4,5,4]
  // arrnew=Array.from(new Set(arrnew));
  // var [arr,wei]=arrnew
  console.log(arrnew.indexOf(arrnew));
  },
};
</script>
 <style lang='css'>
</style>